home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-01-16 | 25.6 KB | 628 lines | [TEXT/hscd] |
- Table of Contents:
- ------------------
- (I) Tips for different operating systems
- (II) FAQ
- (III) Some file formats
- (IV) Some tips
-
-
- --------------------------------------------------------------------------------
- PART I -- TIPS FOR DIFFERENT OPERATING SYSTEMS
- --------------------------------------------------------------------------------
-
- (1). WINDOWS (from Oliver Weyand)
- Start Display under WINDOWS through a PIF file. Give display all
- memory you have (parameters -1 for ems and/or xms in pif-editor),
- because you will have no swap-space in a windows-shell (that's
- ok, because windows will manage the virtual memory). Make sure
- NOT to use a graphic driver in protected mode (windows will show
- you one of this boring error messages), so don't add the 'driver ::p'
- statement to your go32 environment.
- With DISPLAY 1.82 or latter, you are not forced to use VESA driver.
-
- (2). OS/2 (from Oliver Weyand, chbrin3@nyx.uni-konstanz.de)
- Load a vesa-driver in your autoexec.bat (under OS/2 this file is only
- executed when you open a DOS shell). Don't use 'driver ::p'. Give it
- enough memory: the standard 4MB dpmi-memory are not enough. Open the
- menu for the DOS shell and edit the entries for memory (EMS,XMS,DPMI).
- Also edit the entries for graphic capabilities. If you won't use the
- autoexec.bat file for display's DOS session, enter the name of the used
- batch file. If you don't understand this things refer to your OS/2
- manual. For further hints how to setting up DOS shells under OS/2 refer
- to the hints that can be found on many ftp servers (if you are an OS/2
- user you will know them, i.e. hobbes).
- It was reported to me, that display won't run under OS/2 at all. Sorry
- guys, can't help you. I just tell you what has worked for me with version
- 2.1 on my 486/33. BTW, if you search a good viewer-converter for OS/2
- give Joe-View a chance (joevw128 or higher, shareware).
-
- (3). Novell DOS 7 (from Oliver Weyand, chbrin3@nyx.uni-konstanz.de)
- When running display under NWDOS 7 there is only one thing that is
- different from MSDOS: the multitasking environment. You have to make
- sure, that display can't use dpmi. So you can either type 'dpmi off'
- at the NWDOS prompt or add the nodpmi statement to the go32 variable
- (set go32=nodpmi ...) in the runme.bat. Because the NWDOS multitasker
- supports only standart VGA mode you should use display not in graphics-
- text mode (if you do display will switch to plain text after an error
- message). Further the only available graphics mode is 320x200-8bit.
- You can convert files or generate movies in the backround, while you
- play a your favourite game (beware, that you need at least a 486 with
- at least 8-16MB RAM). Because I use NWDOS on a stand-alone machine I
- can't say anything about using display with Netware-Lite.
-
- (4). LINUX (reported by Yanming PENG)
- I have done it. DISPLAY 1.87, Linux 1.2.8 +net-driver-patched, dosemu
- 0.60.1. On a cosole. DISPLAY runs very well (keyboard only, without
- using mouse). At least it runs with a S3 Trio32 1M card with vesa_s3.prn
- on my pentium S-60 with 16M RAM, XFree86 3.1.1. Using DPMI support under
- dosemu 0.60.1. But it failed to run with my Trident 8900C 1MB card at
- home. Probably the dosemu internal mouse driver cause the problem. QPV
- (aka QPEG 1.6c) also has problem with the internal mouse driver. The
- dosemu 0.60.x now has DPMI 0.90 support and can run some Windows program
- in WinOS2.
- When running display under dosemu 0.60.X under Linux, be sure to edit the
- config.dis to turn the automatic detect Sound Blaster off. Since DISPLAY
- will disable sound in DPMI anyway. Setup enough dpmi memory for dosemu
- in /etc/dosemu.conf to let DISPLAY run comfortably. MPG,AVI,GL etc. work
- greatly.
-
-
- --------------------------------------------------------------------------------
- PART II -- FAQ
- --------------------------------------------------------------------------------
-
- Q1: How can I convert group of 24-bit images to 8-bit images with the same
- palette table ?
- A: Use the following steps:
- 1. Find a palette table:
- Tag the images you want. Select 'accumulation quantization' to
- produce a palette table.
- - or -
- press F5, then 'load a palette table'.
- 2. press F4, then change 'number of colors option' to 'no effect'.
- 3. press F5, then select 'push palette table'.
- 4. Tag the images you want. Select 'batch conversion' with two special
- effects:
- (1) 'pop palette table'
- (2) 'color quantization' with 'current palette' option.
-
-
- Q2: How can I view the original palette table of an image ?
- A: press F4, then change 'number of colors option' to 'no effect'.
-
-
- Q3: How can I resize image using percentage ?
- A: Just add '%' to end of number, like '120%'.
-
-
- Q4: Why does this program show the message, 'CPU must be in real mode' ?
- A: It is likely that you have 'device=emm386.exe noems' in config.sys.
- Remove 'noems'.
-
- Q5: What is 'response file' ?
- A: Response file is used to overcome the 128-byte limit in command line
- length. You can put anything in response file just as in command line.
- For example, you can put the following lines in IMAGE.LST :
-
- aaa.gif
- bbb.jpg
- ccc.bmp
-
- then use 'DISPLAY --slide @IMAGE.LST' to do slide show.
-
- Q6: What is 'description file' ?
- A: Desciprtion file is a file containing the description for each image
- in current directory. It can help you remember what is in each image.
- You can change the file name to whatever you want (Please read the
- TEXT section in config.dis).
- The standard file name for 4DOS (another command processor for MS-DOS
- which can replace COMMAND.COM) is descript.ion. If you want to manipulate
- description file yourself, I suggest that you get 4UTILS??.ZIP from
- simtel20 mirror sites.
- Please see PART III for the format. The format used in 4DOS is more
- complicated than that listed here.
-
- Q7: What files are needed for minimal usage ?
- A: The minimal set of needed files is :
- GO32.EXE, DISPLAY.EXE, RUNME.BAT, one Video Driver, CONFIG.DIS,
- EMU387(if you don't have x87), Fonts(if you want contact sheet).
- Any thing else can be deleted.
-
- Q8: Why don't movie and mouse work in Windows or OS/2 environment ?
- A: Because of the timer problem, movies are not supported in these environments.
- Mouse in these environments is not stable yet, so I disable it in the
- official release.
-
- Q9: What is 'processing target' ?
- A: DISPLAY can store both 8-bit and 24-bit images in memory. You must select
- one from the two. If 'img8' is highlighted, all operations are performed
- upon 8-bit image. Otherwise 24-bit image is used.
-
- Q10: What is 'linking' ?
- A: For people who have 8-bit(256 colors) video card only, there is no
- possibility to view true-color image. Because 24-bit image is quantized
- to 8-bit before viewing. Can I crop true-color image manually in graphic
- mode ? Yes, by setting resource 'auto_link_24_to_8' when you crop 8-bit
- image, 24-bit image is cropped, too. 'linking' works for cropping only.
-
- Q11: How can I make a new video driver ?
- A: Look at the DRVSRC directory. Find a source file that is close to your
- video card. Use text editor to edit the source file. Follow the commands
- in makefile to make a new video driver.
- All video drivers are borrowed from DJGPP and GRX.
- You can get the whole DJGPP and GRX package from :
- omnigate.clarkson.edu: /pub/msdos/djgpp
- or simtel20 mirros sites.
- You must understand assembly language. I suggest that you use et4000.asm
- as a template.
-
- Q12: How can I increase the JPEG decompression speed ?
- A: set jpeg_fast_decode to 1. If you have only 8-bit(256 colors) display card,
- you should tune two additional parameters: jpeg_quantization &
- jpeg_color_dither. For the fastest speed, set jpeg_quantization to 'Grey256'
- or '1 Pass' and jpeg_color_dither to 'Ordered'.
- Please read the PROCESS_CONTROL section in config.dis.
-
- Q13: What do the JPEG-related parameters mean ?
- A: For the Decompression parameters, please read the PROCESS_CONTROL section
- in config.dis.
- For Compression parameters : (Borrowed from IJG document)
- Quality :
- The quality switch lets you trade off compressed file size against
- quality of the reconstructed image: the higher the quality setting,
- the larger the JPEG file, and the closer the output image will be to
- the original input. Normally you want to use the lowest quality
- setting (smallest file) that decompresses into something visually
- indistinguishable from the original image. For this purpose the
- quality setting should be between 50 and 95; the default of 75 is
- often about right. If you see defects at -quality 75, then go up 5 or
- 10 counts at a time until you are happy with the output image. (The
- optimal setting will vary from one image to another.)
-
- quality 100 will generate a quantization table of all 1's,
- eliminating loss in the quantization step (but there is still
- information loss in subsampling, as well as roundoff error). This
- setting is mainly of interest for experimental purposes. Quality
- values above about 95 are not recommended for normal use; the
- compressed file size goes up dramatically for hardly any gain in
- output image quality.
-
- Optimize:
- Perform optimization of entropy encoding parameters. Without
- this, default encoding parameters are used. optimize usually
- makes the JPEG file a little smaller, but DISPLAY runs somewhat
- slower and needs much more memory. Image quality and speed of
- decompression are unaffected by optimize.
-
- Smooth N:
- Smooth the input image to eliminate dithering noise. N ranging
- from 1 to 100, indicates the strength of smoothing. 0 (the
- default) means no smoothing.
- The smooth option filters the input to eliminate fine-scale noise.
- This is often useful when converting GIF files to JPEG: a moderate
- smoothing factor of 10 to 50 gets rid of dithering patterns in the
- input file, resulting in a smaller JPEG file and a better-looking
- image. Too large a smoothing factor will visibly blur the image,
- however.
-
- Restart marker N:
- Emit a JPEG restart marker every N MCU rows, restart 0 (the
- default) means no restart markers.
- The restart option inserts extra markers that allow a JPEG decoder to
- resynchronize after a transmission error. Without restart markers,
- any damage to a compressed file will usually ruin the image from the
- point of the error to the end of the image; with restart markers, the
- damage is usually confined to the portion of the image up to the next
- restart marker. Of course, the restart markers occupy extra space.
- We recommend restart 1 for images that will be transmitted across
- unreliable networks such as Usenet.
-
- Sample HxV:
- Set JPEG sampling factors. If you specify fewer H/V pairs than
- there are components, the remaining components are set to 1x1
- sampling. The default setting is equivalent to sample 2x2.
- This "wizard" switch is intended for experimentation with JPEG. If
- you don't know what you are doing, don't use them.
-
- Fast JPEG encode:
- Use fast integer DCT (less accurate).
-
- Q14: Can I play movie under Windows or OS/2 ?
- A: Yes. But the timing is not very accurate. If you use third-party products,
- playing movie may not work.
-
- Q15: Should I enable 'skip B frame' in MPEG ?
- A: If you want to increase frame rate, enable this option. It increases the
- playing speed, but you will see the discontinuity in playing.
- Don't enable this option when saving each frame.
-
- Q16: What is the difference between CURRENT and DEFAULT description file ?
- A: DEFAULT is the filename specified in config.dis (in TEXT section). You
- can change it within DISPLAY. (function key F4)
- CURRENT is the filename you select by using function key 'g' or 'G'.
- When you change to a new directory, description file is reset to the
- DEFAULT. At this time, CURRENT is the same as DEFAULT. You can use
- 'g' or 'G' to change CURRENT to any file you want, and DISPLAY uses this
- file as description file until you change to another directory. You can also
- change CURRENT back to DEFAULT by function key 'ALT_F'.
-
- Q17: Why does DISPLAY not load description or image dimension from description
- file ?
- A: You must turn on the 'description' and/or 'dimension' options in
- resource 'extra_text_option' and turn on resource 'read_desc_dim'.
- Note: If the image file size in description file is different from the file
- size DOS reports, dimension is not read. (date and time are not used).
-
- Q18: Why does DISLAY not write image dimension to description file ?
- A: You must set the resource 'write_desc_dim' to 1 to enable this.
- Note: DISPLAY doesn't automatically write description and/or image dimension
- to description file. You must do this manually (key ALT_W).
-
- Q19: What is the difference between normal mouse and mouse ball ?
- A: As far as I know, the difference is that mouse ball doesn't have buttons.
- In mouse ball mode, if you move mouse, image will scroll. No button is
- needed. You can use 'mouse_ball_factor' to change the corresponding image
- scrolling rate.
-
- Q20: What is INDEX ?
- A: INDEX is a .idx file which contains the corresponding contact sheet name
- and the image position within contact sheet. When you select INDEX file,
- DISPLAY loads the corresponding contact sheet and allows you to select
- which image you want to view within this contact sheet.
- INDEX file is very flexible. You can change the image name and path, so
- that you can view image in other directory or even movie files.
- Note: For those who don't have Hi/True Color card, I suggest that you save
- the contact sheet as 8-bit image.
-
- Q21: What is Thumbnail ?
- A: Thumbnail is a small image DISPLAY generates that can help to speed up
- preview. The advantage is no delay for preview. The disadvantage is that
- you need additional disk space for thumbnail. For the format of thumbnail
- file, please read Part III of the file. If you want to know how thumbnail
- works in preview, read 'Preview' section in DISPLAY.DOC.
-
- Q22: what is Association ?
- A: Assocition is a link between file and program. Though DISPLAY can read
- many file formats, it can't read ALL. You can use association to tell
- DISPLAY what to do with the specified files. You can also use association
- to override the internal behavior in DISPLAY. For example, if you don't
- like the GL player in DISPLAY, you can use the following association to
- view GL with grasprt:
-
- association=.gl,grasprt
-
- Actually you can specify any association you want. Full path and command-
- line switch are allowed.
-
- Q23: How can I use Sound Blaster in my computer ?
- A: You must set the environment variable BLASTER. Please consult your Sound
- Blaster manual.
- DISPLAY supports SB 1.0 .. 2.0, SB Pro and SB 16. Sample size is limited
- to 8 bits. Stereo sound is supported for SB Pro and SB 16.
- Sample frequency:
- SB : 4k .. 23k Hz.
- SB Pro : 4k .. 23k Hz (mono), 4k .. 11.5k Hz (stereo)
- SB 16 : 5k .. 45k Hz (all).
-
- Q24: Why does my computer crash when I start DISPLAY if my Sound Blaster
- emulator is loaded ?
- A: By default, DISPLAY will check if Sound Blaster exits in your computer.
- If your Sound Blaster emulator doesn't work in protected mode, you must
- disable this checking by setting 'check_sb' (in config.dis) to 0. In this
- way, DISPLAY assumes there is no Sound Blaster in your system.
-
- Q25: Why can't I use TNL packfile ?
- A: Currently DISPLAY only supports packfile in ZIP (Inflate and Store) format.
- You must use PKZIP 2.04g or ZIP 2.0 to generate the packfile.
-
- Q26: Why can't DISPLAY play sound with movie ?
- A: 1. You don't have SB or compatible sound card. See Q23 and Q24.
- 2. The sound track in movie is corrupted.
- 3. The sound track coding method is not supported.
- 4. The sound track in movie is beyond the capability of your sound card.
- 5. Not enough memory in lower 640K memory. DISPLAY allocates buffer in
- lower 640K memory for DMA use.
-
- Q27: Why can't I hear sound with MPEG movie ?
- A: 1. There must be a WAV file that has the same filename as MPEG file.
- For example, movie.mpg and movie.wav.
- 2. See Q26.
-
- Q28: Why does audio not synchronize with video ?
- A: 1. The sample frequency of audio track is too high. There is no way to
- correct this problem.
- 2. Movie play time is too long. Please free SPACE to pause, then pree
- RETURN to continue. DISPLAY auto-synchronize video and audio after
- pause.
- 3. Some AVI files is not truely audio-video interleaved. Instead they
- write the whole audio track as single chunk. This causes sound card
- DMA buffer to overflow. Please set 'load sound first' to 1.
-
- Q29: Why is screen garbled when sound is played ?
- A: If your computer is too slow, DISPLAY discards some frames to keep the
- synchronization between video and audio. This will introduce noise to the
- screen. To fix this problem, you must get a faster computer.
-
- Q30: Why can't I play sound under Windows ?
- A: Using sound card causes Windows to crash, so sound playing is disabled.
-
-
-
- --------------------------------------------------------------------------------
- PART III -- SOME FILE FORMATS
- --------------------------------------------------------------------------------
-
- Palette File Format
- -------------------
-
- offset length content
-
- 0 8 "DISPpal0"
- 8 4 number of colors(Intel byte order).
- 12 4 R,G,B,A for each color.
- ... ... ......
-
-
-
- YUV Format (from Berkeley MPEG ENCODER package)
- ----------
-
- The U and V components are subsampled 4:1.
-
- To give you an idea of what format the YUV file must be in, the following
- code will read in a YUV file:
-
- unsigned char **y_data, **cr_data, **cb_data;
-
- void ReadYUV(char *fileName, int width, int height)
- {
- FILE *fpointer;
- register int y;
-
- /* should allocate memory for y_data, cr_data, cb_data here */
-
- fpointer = fopen(fileName, "r");
-
- for (y = 0; y < height; y++) /* Y */
- fread(y_data[y], 1, width, fpointer);
-
- for (y = 0; y < height / 2; y++) /* U */
- fread(cb_data[y], 1, width / 2, fpointer);
-
- for (y = 0; y < height / 2; y++) /* V */
- fread(cr_data[y], 1, width / 2, fpointer);
-
- fclose(fpointer);
- }
-
-
-
- Raw RGB Format
- --------------
-
- for (y = 0; y < height; ++y)
- for (x = 0; x < width; ++x) {
- read RED; /* 1 byte */
- read GREEN; /* 1 byte */
- read BLUE; /* 1 byte */
- }
-
-
-
- Raw GREY Format
- ---------------
-
- for (y = 0; y < height; ++y)
- for (x = 0; x < width; ++x)
- read GREY; /* 1 byte */
-
-
-
- Contact Sheet Script File Format
- --------------------------------
-
- 1. Lines start with # are comment lines.
- 2. You must add this string to start of the file : "contact_sheet". This
- string is an ID of script file.
- 3. You can write up to 2 strings for each image file in script file.
- Each string can be up to 49 characters.
- Strings are separated with the character '|'.
-
- For example : I am 1| You are 2
- 4. If possible DISPLAY writes the two strings in the same line.
- For example: I am 1 You are 2
- ^ Strings are separated with one SPACE character.
-
- If the total length of two strings is too long, DISPLAY writes the two
- strings in two lines.
- For example: I am 1
- You are 2
-
- 5. IF string 2 starts with '|', DISPLAY write two strings in two lines
- always.
-
- For example, line 1| |Always line 2
- Output is: line 1
- Always line 2
-
- 6. If image file name contains path(e.g. c:/qqq/n.gif or ../n.gif), it is
- used as is. Otherwise(no path) current directory is assumed.
-
- 7. The following is a sample script file:
-
- --------Start--------
-
- # This is a sample file
-
- contact_sheet
-
- ../KIKI-TON.GIF Kiki's| gif file
- c:N.GIF Nausicaa| gif file
- NAUSICAA.GIF Another Nausicaa
- PORCO.GIF Porco Rosso
- d:/tmp/image/TOTOROS.GIF Totoros| gif
- WOTW1.GIF |line 2 only
-
- --------Stop--------
-
-
- Description File Format
- -----------------------
-
- Format:
-
- <filename.ext> <Any string up to 149 characters>
-
- For example:
-
- aaa.gif this is aaa.gif
- bbb.jpg I am bbb :-)
- cat.bmp Oh! There is a cat in this image.
-
-
- Batch Contact Sheet Script File Format
- --------------------------------------
-
- 1. Lines start with # are comment lines.
- 2. You must add this string to start of the file : "batch_contact_sheet".
- This string is an ID of script file.
- 3. You can load this file from command-line or within DISPLAY.
- 4. The format of user input string is in 'Contact Sheet Script File Format'.
- 5. SHEET.TPL is a documentation file. Read it.
-
-
- Image Dimension Format in Description File
- ------------------------------------------
-
- @<ID>Size,Date,Time,Width,Height,Pixel
-
- Where:
- @ : a numerical number 4 (i.e. CTRL_D in ASCII)
- <ID> : a number(byte, 8 bits) assigned by 4DOS. DISPLAY uses 'H'.
- Size : File size in Hex format.
- Date : File date in Hex format.
- Time : File time in Hex format.
- Width : Image width in Dec format. 0 for non-image file.
- Height : Image height in Dec format. 0 for non-image file.
- Pixel : Pixel size in Dec format. Must be 0, 1, 3, 11 or 13.
- 11 and 13 mean that this file is movie.
-
-
- INDEX File Format
- -----------------
-
- <ID>
- conatc_sheet
- number
- image1 x1 y1 width1 height1
- image2 x2 y2 width2 height2
- ....
- ....
-
- Where
- <ID> : The first line must be the string "DISPLAY_INDEX_FILE".
- conatc_sheet : The corresponding conatc sheet file of this index.
- You can include path in the filename. If path is not found,
- DISPLAY loads contact sheet from current path.
- number : Number of images in this contact sheet.
- image1 : filename of image1 in contact sheet. Path is allowed.
- image loading is the same as contact sheet.
- x1 y1 : The position of image1 in contact sheet.
- width1 height1 : The bounding box of image1.
-
- Note: You can modify the contact sheet name and image name. Please don't
- modify image position and bounding box.
-
- For example:
-
- DISPLAY_INDEX_FILE
- c:\pic\example\conact.jpg
- 3
- aaa.gif 0 0 100 100
- bbb.bmp 0 100 100 100
- c:\pic\good\ccc.jpg 100 0 100 50
-
-
- Thumbnail File Format
- ---------------------
-
- offset length content
-
- 0 7 "DISPTNL"
- 7 1 Format. '0' : Grey scale Raw.
- '1' : Grey scale Jpeg.
- '2' : Color Raw.
- '3' : Color and grey (raw).
- '4' : Color and grey (jpeg).
- '5' : Color Jpeg.
- 8 4 thumbnail width (max 200 pixels)
- 12 4 thumbnail height (max 200 pixels)
- 16 4 original image width
- 20 4 original image height
- 24 16 original image name, padded with 0.
- 40 128 reserved, must be 0.
- 168 variable thumbnail image.
-
-
- Tables in mask translation (by Bernhard Maerz)
- --------------------------
-
- 1. Brightness adjust
-
- for (y = 0; y <= 255; ++y)
- for (x = 0; x < 256; ++x) {
- if (y <= 128) *table++ = ((x * y) / 128);
- else *table++ = ((y - 128) * 255 + (255 - y) * x) / 127;
- }
-
- 2. Contrast adjust
-
- for (y = 0; y <= 255; ++y)
- for (x = 0; x < 256; ++x) {
- if (y <= 128) *table++ = (128 * (128 - y) + y * x) / 128;
- else {
- int tmp;
-
- tmp = (x * 127 + MAX_SLOPE * (y - 128) * (x - 128)) / 127;
- /* slope = 1 .. 1 + MAX_SLOPE */
- if (tmp > 255) tmp = 255;
- else if (tmp < 0) tmp = 0;
- *table++ = tmp;
- }
- }
-
- Table size is of 256 * 256 (i.e. 64k) bytes.
- Where
- x : means the pixel taken from input image.
- y : means the pixel taken from mask image.
- MAX_SLOPE : is 3 in DISPLAY.
-
-
-
- --------------------------------------------------------------------------------
- PART IV -- SOME TIPS
- --------------------------------------------------------------------------------
-
- Making of 3D-Pictures to use with Red/Blue(Green) Glasses: (by Bernhard Maerz)
- ----------------------------------------------------------
-
- First there is needed the following Color Table which will be used:
-
- for (y = 0; y < 256; ++y)
- for (x = 0; x < 256; ++x) {
- *table++ = x; /* Blue */
- *table++ = 0; /* Green */
- *table++ = y; /* Red */
- }
-
- Because most converted 3D-Pictures are too dark, the brightness of the
- Color Table could be increased little bit.
-
- Then, the picture for the left eye must be loaded into any stack (it will
- be used as mask).
- The picture for the right eye must be loaded into memory and with it there
- have to be done the mask image translation.
-
- (The picture for both eyes must be transformed to grey scale for correct
- output.)
-